
// SJ's Hex <-> Coordinates conversions
// Use these if you want to make effects be relative to an objects position.
// It is the user's responsibility to make sure that the hex is legitimate.
// (Don't blame me if you move ships outside the map!)
function Convert_HexToCoordX returns long
params
	hexID: long
vars
begin
	return Sys_Mod_Long(hexID, 1000) - 100
end
function Convert_HexToCoordY returns long
params
	hexID: long
vars
begin
	return Sys_Divide_Long(hexID, 1000) - 100
end
function Convert_CoordsToHex returns long
params
	Xcoord: long
	Ycoord: long
vars
begin
	return (100 + Ycoord) * 1000 + (100 + Xcoord)
end
